<?php

namespace app\index\model;

use think\Db;
use think\Model;

class Collect extends Model
{

    public function sel($id) {
        $res = Db::name('collect')->alias('c')->where('user_id',$id)->join('article a','c.article_id=a.id')->join('group','a.class_id=group.id')->field('c.id,a.title,c.create_time,group.name')->select();
        return $res;
    }
}
